<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 <%@ include file="/WEB-INF/views/common/common.jsp"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="ko">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title></title>	
<script type="text/javascript" >
			var contextPath= "<c:out value='${pageContext.request.contextPath}'/>";
			var cpage= "<c:out value='${pd.cpage}'/>";
			var totalPage= "<c:out value='${pd.totalPage}'/>";
			var board_cd= "<c:out value='${boardDto.board_cd}'/>";
</script>
	
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/jquery-1.10.2.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/home/home.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/jquery.simplePagination.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/board/board.js"></script>
<link href="${pageContext.request.contextPath}/resources/css/simplePagination.css" rel="stylesheet" type="text/css">
</head>
<body>
<form id="frm" name="frm" action="/board/list.do" onsubmit="return checkSubmit(this);">
	  

<c:out value ="${pageContext.request.contextPath}" />

<br/><br/><br/>
 리스트 
<br>
	
	<table >
			<tbody>
				<c:forEach items="${list}" var="item" varStatus="status">
				 <TR>
						<td> ${item.article_no}</td>
						<td> ${item.title}</td>
						<td> ${item.content}</td>
						<td> ${item.hit}</td>
						<td> ${item.regdate}</td>
				 <TR>					
				</c:forEach>
			</tbody>
	</table>
	
	<div id="light-pagination" class="pagination"></div>
	
	<script>

$('#light-pagination').pagination({

		items: 1, // Total number of items that will be used to calculate the pages.
		
		itemsOnPage: 1, // Number of items displayed on each page.
		
		pages:totalPage,  // If specified, items and itemsOnPage will not be used to calculate the number of pages.
		
		displayedPages:5, // How many page numbers should be visible while navigating. Minimum allowed: 3 (previous, current & next)
		
		edges:2, 
		
		currentPage: cpage, // Which page will be selected immediately after init.
		
		hrefTextPrefix: "?board_cd="+board_cd+"&cpage=", // A string used to build the href attribute, added before the page number.
		
		hrefTextSuffix: '', // Another string used to build the href attribute, added after the page number.
		
		prevText: "Prev", // Text to be display on the previous button.
		
		nextText: "Next", // Text to be display on the next button.
		
		cssStyle: "light-theme", // The class of the CSS theme.
		
		selectOnClick: true, // Set to false if you don't want to select the page immediately after click.
		
		
		onPageClick: function(pageNumber, event) {
			// Callback triggered when a page is clicked
			// Page number is given as an optional parameter
					//selectPagelist(pageNumber, event);
			
			console.log("pageNumber="+pageNumber);
			console.log("event="+event);
			
			return;
			
		},
		
		
		
		});

</script>
	
<button id="ajaxDataBtn" onclick="noticeWrite();">글쓰기</button>
			
<button id="ajaxDataBtn" onclick="noticeDel();">삭제</button>			
</form>
</body>

</html>












			
		

